﻿<%@ Page Title="" Language="VB" MasterPageFile="~/masterpages/Main.master" AutoEventWireup="false"
    CodeFile="addEvent.aspx.vb" Inherits="events_admin_addEvent" ValidateRequest="false" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="/css/cal.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/scripts/tiny_mce/tiny_mce_gzip.js"></script>
    <script type="text/javascript">
        tinyMCE_GZ.init({
            plugins: 'iespell',
            themes: 'advanced',
            languages: 'en',
            disk_cache: true,
            debug: false
        });
    </script>
    <script type="text/javascript">
        tinyMCE.init({
            mode: "textareas",
            theme: "advanced",
            plugins: "iespell,paste",
            theme_advanced_buttons1: "bold,italic,underline,separator,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,link,unlink,|,pastetext,pasteword,selectall,|,outdent,indent,|,code",
            theme_advanced_buttons2: "",
            theme_advanced_buttons3: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom"

        }); 
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <asp:ObjectDataSource ID="dsEvent" runat="server" InsertMethod="CreateEvent" 
        SelectMethod="GetEvent" TypeName="HensonOnline.DataAccess" 
        OldValuesParameterFormatString="original_{0}">
        <InsertParameters>
            <asp:Parameter Name="hasAlbum" Type="Boolean" />
            <asp:Parameter Name="userId" Type="Int32" />
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="desc" Type="String" />
            <asp:Parameter Name="Date" Type="DateTime" />
            <asp:Parameter Name="location" Type="String" />
            <asp:Parameter Name="address" Type="String" />
            <asp:Parameter Name="city" Type="String" />
            <asp:Parameter Name="state" Type="String" />
            <asp:Parameter Name="zip" Type="String" />
            <asp:Parameter Name="archive" Type="Boolean" />
            <asp:Parameter Name="Private" Type="Boolean" />
        </InsertParameters>
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="1" Name="eventId" 
                QueryStringField="eventId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <div class="fullContent">
        <asp:FormView ID="frmEvent" runat="server" DataSourceID="dsEvent" 
            EnableModelValidation="True">
            <ItemTemplate>
                <div class="formRow">
                    <span class="formFieldShort">EventId:</span>
                    <asp:Label ID="lblEventId" runat="server" Text='<%#Eval("EventId")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">UserId:</span>
                    <asp:Label ID="lblUserId" runat="server" Text='<%#Eval("UserId")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">AlbumId:</span>
                    <asp:Label ID="lblAlbumId" runat="server" Text='<%#Eval("AlbumId")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Title:</span>
                    <asp:Label ID="lblTitle" runat="server" Text='<%#Eval("Title")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Desc:</span>
                    <asp:Label ID="lblDesc" runat="server" Text='<%#Eval("Desc")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Date:</span>
                    <asp:Label ID="lblDate" runat="server" Text='<%#Eval("Date")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Location:</span>
                    <asp:Label ID="lblLocation" runat="server" Text='<%#Eval("Location")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Address:</span>
                    <asp:Label ID="lblAddress" runat="server" Text='<%#Eval("Address")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">City:</span>
                    <asp:Label ID="lblCity" runat="server" Text='<%#Eval("City")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">State:</span>
                    <asp:Label ID="lblState" runat="server" Text='<%#Eval("State")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Zip:</span>
                    <asp:Label ID="lblZip" runat="server" Text='<%#Eval("Zip")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Archive:</span>
                    <asp:CheckBox ID="chkArchive" runat="server" Checked='<%#Bind("Archive")%>' Enabled="false" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Private:</span>
                    <asp:CheckBox ID="chkPrivate" runat="server" Checked='<%#Bind("Private")%>' Enabled="false" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">&nbsp;</span>
                    <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" /> | 
                    <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" /> | 
                    <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="New" />
                </div>
            </ItemTemplate>
            <InsertItemTemplate>
                <div class="formRow">
                    <span class="formFieldShort">Title:</span>
                    <asp:TextBox ID="txtTitle" runat="server" Text='<%#Bind("Title")%>' CssClass="adminTxt" />
                    <asp:RequiredFieldValidator  ID="valTitle" runat="server" ControlToValidate="txtTitle" ErrorMessage="Enter a title" Display="Dynamic" SetFocusOnError="true" />
                
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Desc:</span>
                    <asp:TextBox ID="txtDesc" TextMode="MultiLine" Width="400px" Height="200px" runat="server" Text='<%#Bind("Desc")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Date:</span>
                    <asp:TextBox ID="txtDate" runat="server" Text='<%#Bind("Date")%>' CssClass="adminTxtPhone" />
                    <asp:ImageButton ID="imgCal" 
                                        runat="server" ImageUrl="~/img/cal.png"  AlternateText="calIcon" 
                                        CausesValidation="False" ImageAlign="Bottom" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle" ErrorMessage="Enter a title" Display="Dynamic" SetFocusOnError="true" />
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtDate" ErrorMessage="RegularExpressionValidator" ValidationExpression="(0|[1-9]|1[012])[- /.](0|[1-9]|[12][0-9]|3[01])[- /.](19|20)[0-9]{2}" />
                    <ajax:CalendarExtender ID="ajaxCal" runat="server" TargetControlID="txtDate" PopupButtonID="imgCal" />

                </div>
                <div class="formRow">
                    <span class="formFieldShort">Location:</span>
                    <asp:TextBox ID="txtLocation" runat="server" Text='<%#Bind("Location")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Address:</span>
                    <asp:TextBox ID="txtAddress" runat="server" Text='<%#Bind("Address")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">City:</span>
                    <asp:TextBox ID="txtCity" runat="server" Text='<%#Bind("City")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">State:</span>
                    <asp:TextBox ID="txtState" runat="server" Text='<%#Bind("State")%>' CssClass="adminTxt" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Zip:</span>
                    <asp:TextBox ID="txtZip" runat="server" Text='<%#Bind("Zip")%>' CssClass="adminTxtZip" />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Add Album:</span>
                    <asp:CheckBox ID="chkHasAlbum" runat="server" Checked='<%#Bind("HasAlbum")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Archive:</span>
                    <asp:CheckBox ID="chkArchive" runat="server" Checked='<%#Bind("Archive")%>' />
                </div>
                <div class="formRow">
                    <span class="formFieldShort">Private:</span>
                    <asp:CheckBox ID="chkPrivate" runat="server" Checked='<%#Bind("Private")%>' />
                </div>
                  <div class="formRow">
                    <span class="formFieldShort">&nbsp;</span>
                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" /> | 
                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                </div>
              
            </InsertItemTemplate>
        </asp:FormView>

    </div>
</asp:Content>
